﻿<UserControl x:Class="TextAdventures.Quest.EditorControls.FindControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        
        <Grid x:Name="InputGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>

            <TextBlock Name="lblFind" VerticalAlignment="Center" Margin="5,0,0,0" Grid.Column="0">Find:</TextBlock>
            <TextBox Name="txtFind" VerticalContentAlignment="Center" KeyDown="txtFind_KeyDown" Margin="3,0,0,0" Grid.Column="1" />
            <TextBlock Name="lblReplace" VerticalAlignment="Center" Margin="5,0,0,0" Visibility="Collapsed" Grid.Column="2">Replace with:</TextBlock>
            <TextBox Name="txtReplace" Margin="3,0,0,0" VerticalContentAlignment="Center" KeyDown="txtReplace_KeyDown" Visibility="Collapsed" Grid.Column="3"/>
        </Grid>

        <StackPanel HorizontalAlignment="Right" Grid.Column="1" Orientation="Horizontal" Margin="5,0,0,0">
            <CheckBox Name="chkBoxRegex" Content="Regex search" VerticalAlignment="Center" Margin="3,0,0,0" DockPanel.Dock="Right" />
            <Button Name="cmdFind" VerticalAlignment="Center" Margin="2,0,0,0" Padding="3,1,3,1" Click="cmdFind_Click">Find Next</Button>
            <Button Name="cmdReplace" VerticalAlignment="Center" Margin="2,0,0,0" Padding="3,1,3,1" Click="cmdReplace_Click" Visibility="Collapsed">Replace</Button>
            <Button Name="cmdReplaceAll" VerticalAlignment="Center" Margin="2,0,0,0" Padding="3,1,3,1" Click="cmdReplaceAll_Click" Visibility="Collapsed">Replace All</Button>
            <Button Name="cmdClose" VerticalAlignment="Center" Margin="2,0,0,0" Padding="3,1,3,1" Click="cmdClose_Click">Close</Button>
        </StackPanel>
    </Grid>
</UserControl>
